package com.example.demo.dao;
import com.example.demo.entry.Block;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface BlockDao {
    /**
     * 提供功能
     * 1.根据高度查block
     * 2.根据hash查block
     * 3.根据block插入信息
     * 4.找到最新加入的块
     * 5.根据id查block
     * 6.更新block
     */
    Block findByhash(String hash);
    Block findByHeight(int height);
    int addBlock(Block block);
    Block findBlock();
    Block findByid(int id);
    void updateNextHash(Block block);
    void updateTransactionAvgCon(Block block);
}
